package com.maimao.api.mall.goods;

import com.maimao.core.model.resp.Result;
import com.maimao.model.common.CommonCheckInput;
import com.maimao.model.common.IdHolder;
import com.maimao.model.common.StatusInput;
import com.maimao.model.goods.Brand;
import com.maimao.model.goods.input.BrandBindCateInput;
import com.maimao.model.goods.input.BrandSearchInput;
import com.maimao.model.user.sys.Department;
import com.maimao.model.user.sys.dto.DelDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @author MaoLin Wang
 * @date 2020/12/8 4:43 下午
 */
@Api(value = "品牌接口")
@RequestMapping("/goods/brand")
public interface BrandApi {


    @ApiOperation("品牌分页条件查询")
    Result<?> search(BrandSearchInput input, Integer page, Integer size);

    @ApiOperation("品牌全量数据")
    Result<?> list();

    @ApiOperation("根据品牌id查询品牌名")
    Result<?> selectNameById(Long id);

    @ApiOperation("批量查询品牌")
    Result<?> selectByIdBatch(List<Long> brandIds);

    @ApiOperation("根据名称精确查询品牌")
    Result<?> selectByName(String name);

    @ApiOperation("查询分类下的品牌")
    Result<?> cateBrands(Integer cid3);

    @ApiOperation("搜索热门品牌")
    Result<?> hotBrand();

    @ApiOperation("根据id查询Logo地址")
    Result<?> findLogoById(Integer id);

    /**
     * 修改logo地址 key：logo value:logo地址 key：id  value: 品牌id
     */
    @ApiOperation("修改Logo地址")
    Result<?> updateLogo(Map<String, String> data);


    @ApiOperation("修改品牌基本信息")
    Result<?> updateBase(Brand brand);

    @ApiOperation("批量修改状态")
    Result<?> updateStatusBatch(DelDto delDto, BindingResult bindingResult);


    @ApiOperation("加入或取消推荐")
    Result<?> operRecommend(StatusInput statusInput, BindingResult bindingResult);

    @ApiOperation("加入或取消热门")
    Result<?> operHot(StatusInput statusInput, BindingResult bindingResult);

    @ApiOperation("创建品牌")
    Result<?> addBrand(Brand brand);

    @ApiOperation("品牌审核")
    Result<?> checkBrand(CommonCheckInput input);

    @ApiOperation("根据品牌主查询品牌")
    Result<?> selectByOwner(Long ownerId);

    @ApiOperation("查询当前登录商家的品牌和品牌所在分类")
    Result<?>shopBrandCate();

    @ApiOperation("商家给已有品牌绑定分类")
    Result<?>brandBindCate(BrandBindCateInput input);


}
